<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function fn(x, y) {
        console.log(this)
        console.log(x + y)
      }

      const obj = {
        uname: 'ikun',
      }

      //   fn()

      //bind方法可以克隆一份函数体，改变函数体内部的this指向，并且返回这个函数体
      //   const fn1 = fn.bind(obj)

      //   fn1(2, 4)
      //   fn1(3, 4)
      //   fn()
    </script>
  </body>
</html>
